

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace JTC.MiniCommerce.Store.Services.ShippingService {

  [Serializable()]
  public class ShippingServiceSettings {

    #region Constants

    public const string SECTION_NAME = "shippingServiceSettings";

    #endregion

    #region Member Variables

    private string _defaultProvider;
    private bool _useShipping;
    private string _shipFromZip = string.Empty;
    private string _shipFromCountryCode = string.Empty;
    private decimal _shippingBuffer;
    private ProviderSettingsCollection _providerSettingsCollection;

    #endregion

    #region Constructors

    /// <summary>
    /// Initializes a new instance of the <see cref="T:ShippingServiceSettings"/> class.
    /// </summary>
    public ShippingServiceSettings() {
      _providerSettingsCollection = new ProviderSettingsCollection();
    }

    #endregion

    #region Properties

    /// <summary>
    /// Gets or sets the default provider.
    /// </summary>
    /// <value>The default provider.</value>
    [XmlAttribute()]
    public string DefaultProvider {
      get {
        return _defaultProvider;
      }
      set {
        _defaultProvider = value;
      }
    }

    /// <summary>
    /// Gets or sets a value indicating whether [use shipping].
    /// </summary>
    /// <value><c>true</c> if [use shipping]; otherwise, <c>false</c>.</value>
    [XmlAttribute()]
    public bool UseShipping {
      get {
        return _useShipping;
      }
      set {
        _useShipping = value;
      }
    }

    /// <summary>
    /// Gets or sets the ship from zip.
    /// </summary>
    /// <value>The ship from zip.</value>
    [XmlAttribute()]
    public string ShipFromZip {
      get {
        return _shipFromZip;
      }
      set {
        _shipFromZip = value;
      }
    }

    /// <summary>
    /// Gets or sets the ship from country code.
    /// </summary>
    /// <value>The ship from country code.</value>
    [XmlAttribute()]
    public string ShipFromCountryCode {
      get {
        return _shipFromCountryCode;
      }
      set {
        _shipFromCountryCode = value;
      }
    }

    /// <summary>
    /// Gets or sets the shipping buffer.
    /// </summary>
    /// <value>The shipping buffer.</value>
    [XmlAttribute()]
    public decimal ShippingBuffer {
      get {
        return _shippingBuffer;
      }
      set {
        _shippingBuffer = value;
      }
    }
	
    /// <summary>
    /// Gets or sets the provider settings collection.
    /// </summary>
    /// <value>The provider settings collection.</value>
    public ProviderSettingsCollection ProviderSettingsCollection {
      get {
        return _providerSettingsCollection;
      }
      set {
        _providerSettingsCollection = value;
      }
    }

    #endregion

  }
}
